fix(#489): inject issue reference into PR titles - #492
Conversation
The code agent generates PR titles from the commit subject line using plain conventional commit format (e.g. "fix: description"), but many target repos enforce title conventions like "type(TICKET): description" via CI checks. Two changes fix this: 1. post-code.sh now detects conventional commit subjects without a scope and injects the issue number as "(#NNN)" before the description. Titles that already have a scope (e.g. Jira IDs or component names) are left unchanged. 2. The code-implementation skill (SKILL.md) now instructs the agent to include the issue reference in the commit subject and to discover PR title conventions during step 3. The post-code.sh fallback is the reliable backstop since the post-script always knows the issue number. The skill update teaches the agent to produce correct titles directly, which also handles Jira-style ticket IDs from the issue body. Added post-code-test.sh with 13 test cases covering scope injection, pre-existing scopes, and non-conventional titles. Note: pre-commit could not run (network error in sandbox). post-triage-test.sh and go tests could not run (jq and go not available in sandbox). Manual verification required. Closes #489
Site previewPreview: https://ce72a853-site.fullsend-ai.workers.dev Commit: |
There was a problem hiding this comment.
Review: #492
Head SHA: a37e87d
Timestamp: 2026-04-28T17:00:00Z
Outcome: approve
Summary
This PR correctly addresses #489 by adding a post-script backstop that injects issue references into conventional commit PR titles, plus skill instructions teaching the agent to produce correct titles directly. The layered approach (skill guidance + post-script fallback) is sound. The shell logic is correct, well-tested with 13 cases, and handles edge cases gracefully. No security concerns.
Findings
Low
- [correctness]
internal/scaffold/fullsend-repo/scripts/post-code-test.sh:18— The test reimplements the title-rewriting logic rather than sourcing it frompost-code.sh, which means the two copies can drift out of sync. The comment at line 15-16 acknowledges this trade-off (the production script requires git/GitHub context that makes sourcing impractical). Acceptable, but worth noting for future maintainers.
Info
- [correctness]
internal/scaffold/fullsend-repo/scripts/post-code.sh:204— Conventional commit breaking change syntax (fix!: description) won't match either grep pattern, so it falls to the else branch and is left as-is (no scope injection). This is a rare case for agent-generated commits and the behavior is safe (title is preserved unchanged), but could be added to the test suite for documentation.
Footer
Outcome: approve
This review applies to SHA a37e87d567e70497852cd3acf1c117a71d916d58. Any push to the PR head clears this review and requires a new evaluation.
The code agent generates PR titles from the commit subject line using plain conventional commit format (e.g. "fix: description"), but many target repos enforce title conventions like "type(TICKET): description" via CI checks.
Two changes fix this:
post-code.sh now detects conventional commit subjects without
a scope and injects the issue number as "(#NNN)" before the
description. Titles that already have a scope (e.g. Jira IDs
or component names) are left unchanged.
The code-implementation skill (SKILL.md) now instructs the
agent to include the issue reference in the commit subject
and to discover PR title conventions during step 3.
The post-code.sh fallback is the reliable backstop since the post-script always knows the issue number. The skill update teaches the agent to produce correct titles directly, which also handles Jira-style ticket IDs from the issue body.
Added post-code-test.sh with 13 test cases covering scope injection, pre-existing scopes, and non-conventional titles.
Note: pre-commit could not run (network error in sandbox). post-triage-test.sh and go tests could not run (jq and go not available in sandbox). Manual verification required.
Closes #489
Changed files
Makefileinternal/scaffold/fullsend-repo/scripts/post-code-test.shinternal/scaffold/fullsend-repo/scripts/post-code.shinternal/scaffold/fullsend-repo/skills/code-implementation/SKILL.mdCloses #489
Post-script verification
agent/489-pr-title-convention)d2afe5d208fdd4c850432c8cd3085baaea349b73..HEAD)Created by fullsend code agent